﻿package com.sgcc.nfc.lock.domain.repository

import com.sgcc.nfc.lock.core.network.NetworkResult
import com.sgcc.nfc.lock.domain.model.PagedList
import com.sgcc.nfc.lock.domain.model.Room

interface RoomRepository {
    suspend fun getRooms(
        page: Int,
        pageSize: Int,
        regionId: Long? = null,
        keyword: String? = null
    ): NetworkResult<PagedList<Room>>

    suspend fun getRoomDetail(roomId: Long): NetworkResult<Room>
    suspend fun createRoom(params: CreateRoomParams): NetworkResult<Unit>
    suspend fun updateRoom(params: UpdateRoomParams): NetworkResult<Unit>
    suspend fun deleteRoom(roomId: Long): NetworkResult<Unit>

    data class CreateRoomParams(
        val roomName: String,
        val regionId: Long,
        val longitude: Double,
        val latitude: Double,
        val address: String?
    )

    data class UpdateRoomParams(
        val roomId: Long,
        val roomName: String,
        val regionId: Long,
        val longitude: Double,
        val latitude: Double,
        val address: String?
    )
}
